﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CSharpDesign.DAL;
using CSharpDesign.BLL;

namespace CSharpDesign.Admin
{
    public partial class XiuGaiSPLeiBie : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                txtname.Text = XiuGaiSPLeiBieService.GetCategoryName(Request.QueryString["id"].ToString());
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                XiuGaiSPLeiBieService.UpadteCategory(Request.QueryString["id"].ToString(), txtname.Text);
                Response.Write("<script language='javascript'>alert('修改成功');location.href='ShangPinFenLeiManger.aspx'</script>");
            }
            catch
            {
                Response.Write("<script language='javascript'>alert('修改失败');'</script>");
            }    
        }

    }
}